<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
<%@ include file="/home/include/init_home.jsp" %>
<%
	HashList code126	= CommonUtil.getCodeList("126", "");
	String est_no	= StringUtil.nvl(request.getParameter("est_no"));
	String est_seq 	= StringUtil.nvl(request.getParameter("est_seq"));

	HashMap param = new HashMap();
	param.put("est_no", est_no);
	param.put("est_seq", est_seq);

	HashList list = DBManager.executeQuery("/sales.xml", "select_enjoy_voucher", param);
%>
<html>
<head>
<style type="text/css">
<!--
.vc_basic {
	font-family: Verdana, Arial, "굴림";
	font-size: 12px;
	color: #333333;
	text-decoration: none;
	line-height: 16px;
}
body {
	margin-left: 0px;
	margin-top: 0px;
}
input {
	border-top:0px;
	border-left:0px;
	border-right:0px;
	border-bottom:0px solid #000;
	text-align:center;
	width:100%;
}
-->
</style>
	<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="/js/common2.js"></script>
	<script>
	$(document).ready(function() {
	<%	if ("".equals(session_dept_code)) { %>
		$('input[type="text"]').each(function(){
			$(this).closest('td').html($(this).val());
		});
	<%	}	%>
	});

	function fnChangePickupImage() {
		$('#pickup_image').attr('src', 'pickup/pickup_'+document.saveForm.pickup_id.value+'.jpg');
	}

	function fnSaveVoucher() {
		$('#saveForm').submit();
	}
	</script>
</head>
<body>

<form name="saveForm" id="saveForm" method="post" action="/admin/sales/voucherSave.do" <%= "Y".equals(list.get("voucher_yn",0)) ? "enctype=\"multipart/form-data\"" : "" %>>
<input type="hidden" name="voucher_gubn" value="enjoy"/>
<input type="hidden" name="est_no" value="<%=est_no %>"/>
<input type="hidden" name="est_seq" value="<%=est_seq %>"/>

<div class="print vc_basic" style="vertical-align:middle; text-align:right; padding:5px;">
	<a href="#nohref" onclick="cfPrint()"><img src="/images/icon/btn_print.gif" border="0"/></a>
<%	if (!"".equals(session_dept_code)) { %>
	<a href="#nohref" onclick="fnSaveVoucher()"><img src="/images/icon/btn_save.gif" border="0"/></a>
<%	} %>
	<a href="#nohref" onclick="self.close()"><img src="/images/icon/btn_close.gif" border="0"/></a>
</div>

<%
	if ("Y".equals(list.get("voucher_yn",0))) {
		if (!"".equals(session_dept_code)) {	%>
			<div class="print">
			<input type="file" name="out_voucher_path" value="" />
			</div>
<%		} %>
		<img src="<%= list.get("out_voucher_path",0) %>"/>
<%	} else {
%>
<table width="869" height="1300" border="1" bordercolor="#999999" cellspacing="0" cellpadding="0">
  <tr>
    <td background="img/bg.jpg" style="background-repeat:no-repeat; background-position:bottom;"><table width="869" cellpadding="0" cellspacing="0">
      <tr>
        <td><table width="829" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="50" height="143"></td>
            <td><table border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td align="right"><img src="img/flower.png"></td>
                  <td width="10"></td>
                  <td><font style="color:#333333; font-family:dotum; font-size:22px;"><b><%= list.get("enjoy_name", 0) %></b></font></td>
                </tr>
            </table></td>
            <td width="50"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="858" colspan="2"><table width="829" height="858" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td><table width="829" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="50%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td height="2" bgcolor="#9c9c9c"></td>
                    <td bgcolor="#9c9c9c"></td>
                  </tr>
                  <tr>
                    <td width="152" height="57" align="center" bgcolor="#f0f0f0"><img src="img/sel_1.jpg" width="104" height="17"></td>
                    <td align="center" class="vc_basic"><input type="text" name="voucher_no" value="<%= list.get("voucher_no", 0) %>"/></td>
                  </tr>
                  <tr>
                    <td height="1" bgcolor="#b2b2b2"></td>
                    <td bgcolor="#9c9c9c"></td>
                  </tr>
                  <tr>
                    <td width="152" height="57" align="center" bgcolor="#f0f0f0"><img src="img/sel_2.jpg" width="66" height="17"></td>
                    <td align="center" class="vc_basic"><input type="text" name="vender_name" value="<%= list.get("vender_name", 0) %>"/></td>
                  </tr>
                  <tr>
                    <td height="1" bgcolor="#b2b2b2"></td>
                    <td bgcolor="#9c9c9c"></td>
                  </tr>
                  <tr>
                    <td width="152" height="57" align="center" bgcolor="#f0f0f0"><img src="img/sel_3.jpg" width="61" height="17"></td>
                    <td align="center" class="vc_basic"><input type="text" name="confirm_no" value="<%= list.get("confirm_no", 0) %>"/></td>
                  </tr>
                  <tr>
                    <td height="1" bgcolor="#b2b2b2"></td>
                    <td bgcolor="#9c9c9c"></td>
                  </tr>
                  <tr>
                    <td width="152" height="57" align="center" bgcolor="#f0f0f0"><img src="img/sel_4.jpg" width="91" height="17"></td>
                    <td align="center" class="vc_basic"><input type="text" name="main_name" value="<%= list.get("main_name", 0) %>"/></td>
                  </tr>
                  <tr>
                    <td height="1" bgcolor="#b2b2b2"></td>
                    <td bgcolor="#9c9c9c"></td>
                  </tr>
                  <tr>
                    <td width="152" height="57" align="center" bgcolor="#f0f0f0"><img src="img/sel_5.jpg" width="130" height="17"></td>
                    <td align="center" class="vc_basic"><input type="text" name="pick_daytime" value="<%= list.get("pick_daytime", 0) %>"/></td>
                  </tr>
                  <tr>
                    <td height="1" bgcolor="#b2b2b2"></td>
                    <td height="1" bgcolor="#b2b2b2"></td>
                  </tr>
                </table></td>
                <td style="padding:20px"></td>
                <td width="50%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td height="2" bgcolor="#9c9c9c"></td>
                    <td bgcolor="#9c9c9c"></td>
                  </tr>
                  <tr>
                    <td width="79" height="57" align="center" bgcolor="#f0f0f0"><img src="img/sel_6.jpg" width="53" height="17"></td>
                    <td align="center" class="vc_basic"><input type="text" name="hotel_name" value="<%= list.get("hotel_name", 0) %>"/></td>
                  </tr>
                  <tr>
                    <td height="1" bgcolor="#b2b2b2"></td>
                    <td height="1" bgcolor="#b2b2b2"></td>
                  </tr>
                  <tr>
                    <td width="79" height="231" bgcolor="#f0f0f0" style="padding-left:10px;"><img src="img/sel_7.jpg" width="58" height="35"></td>
                    <td align="center" valign="top">
         		<%	if (!"".equals(session_dept_code)) { %>
         				<div class="print" style="padding:2px">
							<select name="pickup_id" style="width:300px" onchange="fnChangePickupImage()">
							<%= StringUtil.makeOption(code126, list.get("pickup_id", 0)) %>
							</select>
						</div>
				<%	} %>
				<% 	if ("".equals(list.get("pickup_id", 0))) {	%>
						<img id="pickup_image" src="/images/common/blank.gif"/>
				<%	} else { %>
                    	<img id="pickup_image" src="pickup/pickup_<%= list.get("pickup_id", 0) %>.jpg" />
                <%	} %>
                    </td>
                  </tr>
                  <tr>
                    <td height="1" bgcolor="#b2b2b2"></td>
                    <td height="1" bgcolor="#b2b2b2"></td>
                  </tr>

                </table></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="10"></td>
          </tr>
          <tr>
            <td>


            <table width="829" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="2" bgcolor="#9c9c9c"></td>
                <td bgcolor="#9c9c9c"></td>
              </tr>
              <tr>
                <td width="152" height="55" align="center" bgcolor="#f0f0f0"><img src="img/sel_10.jpg" width="46" height="18"></td>
                <td align="center"><span class="vc_basic"><input type="text" name="prepare" value="<%= list.get("prepare", 0) %>"/></span></td>
              </tr>
              <tr>
                <td height="1" bgcolor="#b2b2b2"></td>
                <td height="1" bgcolor="#b2b2b2"></td>
              </tr>
            </table>            </td>
          </tr>
          <tr>
            <td height="10"></td>
          </tr>
          <tr>
            <td>
            <table width="829" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="50%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td height="2" bgcolor="#9c9c9c"></td>
                    <td bgcolor="#9c9c9c"></td>
                  </tr>
                  <tr>
                    <td width="152" height="35" align="center" bgcolor="#f0f0f0"><img src="img/sel_8.jpg" width="81" height="17"></td>
                    <td align="center" class="vc_basic"><input type="text"  class="vc_basic" value="<%= list.get("issue_date", 0) %>"/></td>
                  </tr>
                  <tr>
                    <td height="1" bgcolor="#b2b2b2"></td>
                    <td height="1" bgcolor="#b2b2b2"></td>
                  </tr>
                </table></td>
                <td style="padding:20px"></td>
                <td width="50%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td height="2" bgcolor="#9c9c9c"></td>
                    <td bgcolor="#9c9c9c"></td>
                  </tr>
                  <tr>
                    <td width="79" height="35" align="center" bgcolor="#f0f0f0"><img src="img/sel_9.jpg" width="32" height="17"></td>
                    <td align="center" class="vc_basic"><input type="text"  class="vc_basic" value="<%= list.get("issue_user", 0) %>"/></td>
                  </tr>
                  <tr>
                    <td height="1" bgcolor="#b2b2b2"></td>
                    <td height="1" bgcolor="#b2b2b2"></td>
                  </tr>
                </table></td>
              </tr>
            </table>            </td>
          </tr>
          <tr>
            <td height="40"></td>
          </tr>
          <tr>
            <td><img src="img/info.jpg"></td>
          </tr>
          <tr>
            <td height="10"></td>
          </tr>
          <tr>
            <td height="1" bgcolor="#00c0ff"></td>
          </tr>
          <tr>
            <td height="20">&nbsp;</td>
          </tr>
          <tr>
            <td width="829" height="359" align="left" valign="top" class="vc_basic">
            	<%= list.get("enjoy_include", 0) %>
			</td>
          </tr>



        </table></td>
      </tr>
      <tr>
        <td height="230" colspan="2" align="center" valign="bottom"><p><img src="img/bottom_joinhawaii2.jpg" alt="" width="253" height="115"></p>
          <p></p></td>
      </tr>
    </table></td>
  </tr>
</table>
<%
	}
%>
</form>
</body>
</html>

